# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=coin-or-asl
pkgver=2.0.1
pkgrel=1
pkgdesc='COIN-OR autotools harness to build AMPL Solver Library'
arch=(loong64 x86_64)
url='https://github.com/coin-or-tools/ThirdParty-ASL/'
license=(MIT)
groups=(coin-or)
depends=(glibc)
source=($pkgname-$pkgver.tar.gz::https://github.com/coin-or-tools/ThirdParty-ASL/archive/releases/$pkgver.tar.gz
        https://coin-or-tools.github.io/ThirdParty-ASL/solvers-64919f75f.tgz)
sha256sums=('92575a7d5264311a53bfec65bec006475c4b5ef3e79d8d84db798d73e8d3567f'
            'e212926d1d797701adc901ef18eaab6b15edd13f9281dd8c9266e3cdaf8c2dd3')

prepare() {
  cd ThirdParty-ASL-releases-$pkgver
  ln -s ../solvers .
}

build() {
  cd ThirdParty-ASL-releases-$pkgver
  ./configure --prefix=/usr --srcdir="$PWD"
  make
}
package() {
  cd ThirdParty-ASL-releases-$pkgver
  make DESTDIR="$pkgdir" install
}
